home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Oberon⁄F™ 1.1 / Tour (.txt) < prev   
Oberon Document  |  1996-01-05  |  27KB  |  308 lines

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Helvetica
  22. StdLogos.ViewDesc
  23. Helvetica
  24. Helvetica
  25. Helvetica
  26. Helvetica
  27. Helvetica
  28. Helvetica
  29. HostPictures.StdViewDesc
  30. ~ffff
  31. ffffff
  32. ffff33
  33. ff33ff
  34. ff3333
  35. 33ffff
  36. 33ff33
  37. 3333ff
  38. 333333
  39. wwwwww
  40. UUUUUU
  41. DDDDDD
  42. """"""
  43. ]]3WW]]
  44. ]322322
  45. 22W3WW]W]
  46. 233WW33
  47. ]W]]W]
  48. 3]WW]]W
  49. WW]3233
  50. ,3232
  51. 323]3]33
  52. 32332,
  53. 323322,
  54. 23]]32233
  55. ,,233]
  56. WW]WW]]W
  57. ]]323]]WW]]W
  58. 32W]W33
  59. ]    W3]]
  60. 33]W]W3W]W3
  61. W3WW33
  62. 23223322
  63. ]]3]]3
  64. W33W33W]W3W
  65. 33]]3W33W]33]WW
  66. 33]]W
  67. ]]3W323]W3W
  68. ,233W3W33WW33W33W
  69. 232322
  70. ]W33W
  71. 22332
  72. 23]]3W
  73. 32323322
  74. 22322332
  75. 3]]3W223W]W2WW
  76. 2W]W33
  77. 223223322
  78. 22322,
  79. 322323322
  80. 22332,
  81. 2332,2
  82. 2,22,233]3]W
  83. 22323
  84. 2332,
  85. 23232
  86. 32232233W3
  87. 23322322
  88. ,,223]32
  89. 22322
  90. ]33]]3
  91. 23322]332
  92. ]]W]]
  93. 323323223
  94. 23]]3
  95. 233223322
  96. 23,23]]3
  97. W33233W33
  98. WW33W
  99. 22332
  100. W]]WW
  101. 23W]]W
  102. 3    W]W3W33]33
  103. 23223
  104. ,WW]WW3W]
  105. 23]322
  106. W33WW3W33]]3
  107. 22322
  108. 23322
  109. 3W]]W33W33]]W]W]W]3
  110. W]WW3
  111. ]W33]3W
  112. 22332
  113. WW33]
  114. 23]]33
  115. 23232
  116. 3    W]]W]]3323
  117. 23322
  118. 3223]]W3
  119. 23WW3
  120. 3223]
  121. 223322332
  122. 22322322
  123. 2232,
  124. 3,322
  125. 232233
  126. 23322
  127. ,2233]32
  128. 3]]WW332
  129. 33233
  130. 23323
  131. ]33]W32
  132. 323]33]WW33]W
  133. 23233
  134. 3232233]
  135. 332233]
  136. ]3232
  137. 33W33]3
  138. 323W]]3
  139. ]]2,,2]3]
  140. ]W223
  141. 233]]
  142. 23322
  143. 3]]33
  144. 23323
  145. 2233223
  146. 3    2332
  147. 232WW
  148. ]W]33
  149. 2233233
  150. 23]]W3
  151. W3]]W]]W
  152. 3    ]3WW3W332
  153. ,22,2
  154. 3W]3]32
  155. 22W]W
  156. 223]]332
  157. 3    ]]W]]WW32
  158. W]]33
  159. ]3322
  160. 233]3
  161. W]]332
  162. 2332,,
  163. 23233
  164. ]W332
  165. 233233
  166. ]]332
  167. ]33W3]]
  168. W33W3]]
  169. 33W33
  170. ]]W]W]]
  171. 3    ]W33]WW33W
  172. W33WW
  173. 33W3223
  174. W]]33WW]]
  175. ]3233
  176. ]]33WW3W]]WW3
  177. 332]3
  178. 33WW3]W3233
  179. 33]W32
  180. W33W33W]]33WW
  181. ]]33]W3
  182. W]]3]3W
  183. 33W]]3WW]]33]]W]W]W3WW
  184. WW]W23
  185. WW33]]3
  186. 33]]33W]]
  187. W3W]W33]W
  188. 3]33]3W3
  189. 23323W
  190. Helvetica
  191. Helvetica
  192. MODULE ObxHello0;
  193.     IMPORT Out;
  194.     PROCEDURE Do*;
  195.     BEGIN
  196.         Out.String("Hello World"); Out.Ln
  197.     END Do;
  198. END ObxHello0.
  199. TextControllers.StdCtrlDesc
  200. TextControllers.ControllerDesc
  201. Containers.ControllerDesc
  202. Controllers.ControllerDesc
  203. Geneva
  204. DevCommanders.StdViewDesc
  205. DevCommanders.ViewDesc
  206. Helvetica
  207. Helvetica
  208. MODULE ObxHello0;
  209.     IMPORT Out0;
  210.     PROCEDURE Do*;
  211.     BEGIN
  212.         Out.String("Hello World"); Out.Ln
  213.     END Do;
  214. END ObxHello0.
  215. Geneva
  216. Helvetica
  217. Helvetica
  218. MODULE ObxAdr;
  219.     IMPORT Views, Dialog, TextModels, TextMappers, TextViews;
  220.         adr*: RECORD (Dialog.Interactor)
  221.             name*:    ARRAY 64 OF CHAR;
  222.             email*:    ARRAY 64 OF CHAR;
  223.             customerID*:    LONGINT;
  224.             getsUpdates*:    BOOLEAN;
  225.             Text*:    PROCEDURE
  226.         END;
  227.     PROCEDURE Text;
  228.         VAR t: TextModels.Model; f: TextMappers.Formatter; v: Views.View;
  229.     BEGIN
  230.         t := TextModels.dir.New();
  231.         f.ConnectTo(t);
  232.         f.WriteString(adr.name); f.WriteString(", "); f.WriteString(adr.email); f.WriteLn;
  233.         f.WriteString("Customer ID "); f.WriteInt(adr.customerID);
  234.         IF adr.getsUpdates THEN f.WriteString(" - gets updates") END;
  235.         f.WriteLn;
  236.         v := TextViews.dir.New(t);
  237.         Views.OpenView(v);
  238.         adr.name := ""; adr.email := ""; adr.customerID := 0; adr.getsUpdates := FALSE;
  239.         Dialog.Update(adr)
  240.     END Text;
  241. BEGIN
  242.     adr.Text := Text
  243. END ObxAdr.
  244. Geneva
  245. Helvetica
  246.  Oberon/F
  247.     Mac OS
  248.     Guided Tour
  249.     7.95
  250. Guided Demonstration of Oberon/F for Mac OS, Release 1.1.
  251. This Tour
  252. This text is a brief introduction to Oberon/F. Read it and follow the small hands
  253. on examples to get a feeling for the concepts and working model of Oberon/F.
  254. Oberon/F
  255. Oberon/F is an integrated cross
  256. platform development system for the language Oberon. Currently, versions for Mac OS System 7 and Windows 3.1/NT 3.1 are available; other versions are planned. Oberon/F fully exploits the platform-specific user interface. Access to the underlying platform is possible, but can be isolated into special low-level modules. All modules relying on portable interfaces only, which includes most of the Oberon/F services, are fully portable, and still adopt the platform
  257. specific look-and-feel.
  258. The development environment for Oberon/F is identical with the production run
  259. time environment of Oberon/F, enabling rapid development (RAD). The language Oberon is statically type
  260. checked, fully type-safe, and garbage collected. Being a direct descendant of Pascal and Modula
  261. 2, it is easy to learn and to teach, programs are legible, and various programming paradigms, including object
  262. oriented programming, are easily expressed. Oberon is simple enough to serve as a scripting language, yet powerful enough to enable system
  263. level programming: Oberon/F itself is entirely written in Oberon. The Oberon compiler produces fast, native, 32-bit code. The system uses dynamic linking to completely avoid explicit linking steps in the development cycle.
  264. Oberon/F is a fully extensible open framework. New subsystems, at equal footing with the standard text, form, and development subsystems, can be added freely and easily. Existing subsystems can be extended to accommodate new needs. Still, traditional fully linked double
  265. clickable applications can be created as well.
  266. Oberon/F is based on a compound document model. This document model and the supporting component framework architecture is proprietary, but designed in order to be easily integrated with OLE 2.0 and OpenDoc. Support for these industry standards is planned for a later release of Oberon/F.
  267. Embedded document parts can be edited and resized in place. This demo text contains several embedded parts. Here is a first one: A non
  268. portable picture view (without editing capabilities); it can be resized by first clicking into the picture and then dragging the displayed resize handles. Resizing constraints are resolved on the fly: In the example, the picture view always stays in proportion.
  269.     A picture view as an example of an
  270.     embedded document part
  271.     (picture of the Oberon moon)
  272. The Oberon/F framework supports drag & drop editing (integration with the finder "clippings" mechanism is not yet available). To copy, hold down the option key when starting to drag.
  273. An embedded object can be edited as a part of the embedding text. To avoid focusing an embedded part when trying to select it as a whole, hold down the command key while clicking into the part. (When clicking into a part while holding down the shift key in order to extend a selection, focusing is also disabled.)
  274. Almost all operations in Oberon/F are subject to a multi
  275. level undo/redo feature. (In fact, the framework makes it so easy to program something in an undoable fashion that it is almost more involved not to do so.)
  276. Program Development
  277. The following embedded part is a fully editable text, showing the complete source of a small Oberon module. To compile the module, focus the embedded part by clicking into it (e.g. click on the keyword PROCEDURE), and then execute Compile from menu Dev.
  278. ObxHello0 is a minimal "hello world" program in Oberon. It writes a single line to the system log text. Execute Open
  279. Log from menu Info to display the system log, if it isn't open already.
  280. Exported items in Oberon modules are marked by a trailing asterisk; there are no separate header files, definition modules, or the like. Consistency of interfaces and implementations is fully checked by the compiler; version integrity is checked by the dynamic linker.
  281. Module ObxHello0 exports a single command Do. Commands are Oberon procedures to be called by the user; i.e. they can be executed directly from the user interface. There is no need for a top
  282. level module or a "main" procedure. A command can be added to a menu, attached to a button, or executed directly from within a text. To do the latter, the name of the command must be preceded by the name of the implementing module:
  283.  ObxHello0.Do
  284. To execute a command by name, simply select the command string and execute Execute from menu Dev. Another possibility is to precede the command name with a special embedded part, called a commander 
  285.  that can be inserted anywhere into a text using Insert
  286. Commander from menu Tools. Clicking on a commander executes the appropriate command.
  287. If the source contains errors detectable by the compiler, these are flagged directly in the text. For example, the following module version erroneously imports the (non
  288. existing) module Outo, instead of Out. Try to compile the module - the compiler inserts special embedded parts, error markers, flagging the errors that it found. (The compiler also writes a report to the system log.)
  289. By clicking on an error marker, it is expanded to display a short error message. Correct the mistake (delete the superfluous o in IMPORT Outo), and compile again. The marker disappears, and the module is compiled successfully.
  290. The set of currently loaded modules can be inspected using Loaded
  291. Modules from menu Info. The interfaces of modules (loaded or not) can be displayed using the browser: Select a module name and execute Interface from menu Info.
  292. A module remains loaded until it is explicitly unloaded, or until the system is restarted. To unload a module, select the module name and execute Unload
  293. Module
  294. List from menu Dev. For example, unload ObxHello0, modify the string "Hello world", recompile ObxHello0, and activate ObxHello0.Do again. Note that your changes do not affect the running system until after you have unloaded the old module. Such an explicit unloading is a very useful mechanism to allow major changes in multiple modules, while still using and working with the previous version. (Consider editing the Oberon/F system editor with itself...)
  295. Linking Programs to Forms
  296. Besides the text and programming subsystems, the standard Oberon/F configuration also comes with a form subsystem, including a visual designer. Forms are e.g. data entry masks or dialog boxes.
  297. The following module defines a simple record variable to be used for a data entry form.
  298. After compiling the module, a dialog box can be created for the variable ObxAdr.adr using command New
  299. Form... from menu Dev. Just enter the name of the exported global variable ObxAdr.adr into the link field, and click on the Create button. The type information extracted by the compiler is available to Oberon/F at run-time, which is used to automatically create a data-entry window for the form, with a simple default layout.
  300. The created layout can be edited, and then opened as a dialog using the Open as Aux Dialog command in menu Dev.
  301. The text entry fields and the checkbox are directly linked to the fields name, email, and getsUpdates of the variable ObxAdr.adr. The button is linked to the field Text, a procedure variable initialized to refer to procedure Text in module ObxAdr. Clicking the button causes procedure Text to be called. In turn, a new text is created, a report based on the variable adr is written to the text, a new text view is created, and used to open a window displaying the report. Next, the dialog variable is cleared and the system is notified that the variable has changed, causing the form's display to resynchronize with the changed variable.
  302. A form can be saved from within the visual editor; thereafter it can be attached to a menu entry, or another dialog's button. Dialogs are saved in the standard document format, and in a platform
  303. independent way.
  304. And more ...
  305. After this first impression, you may want to consult your documentation for an in-depth coverage of Oberon/F (select the Help item in the Apple menu for an overview over the documentation).
  306. Geneva
  307. Documents.ControllerDesc
  308.